package com.zyl.demo.mapper;

import com.zyl.demo.beans.Home;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HomeMapper{
    @Select("select * from t_home")
    List<Home> getAllHome();

    @Insert("insert into t_home(commodity_id) value(#{commodityId})")
    int addHome(Home home);

    @Delete("delete from t_home where home_id=#{homeId}")
    int deleteHome(int homeId);
}
